Hair ratcheting electroencephalogram sensors

ABSTRACT

A sensor device includes a sensor housing defining a channel extending along a channel axis through the housing from a first side of the sensor housing to a second side of the sensor housing opposite the first side, at least one contact electrode extending from the first side of the housing, an electrically-conducting lead attached to the housing in electrical communication with the at least one contact electrode, and a locking mechanism located in the channel permitting one-way axial motion of a thread threaded through the channel from the first side to the second side.

FIELD

This specification relates generally to electroencephalogram (EEG)systems, and more specifically to sensors for EEG systems.

BACKGROUND

An electroencephalogram (EEG) is a measurement that detects electricalactivity in a person's brain. EEG measures the electrical activity oflarge, synchronously firing populations of neurons in the brain withelectrodes placed on the scalp.

EEG researchers have investigated brain activity using the event-relatedpotential (ERP) technique, in which a large number of experimentaltrials are time-locked and then averaged together, allowing theinvestigator to probe sensory, perceptual, and cognitive processing withmillisecond precision. However, such EEG experiments are typicallyadministered in a laboratory environment by one or more trainedtechnicians. EEG administration often involves careful application ofmultiple sensor electrodes to a person's scalp, acquiring EEG signalsusing specialized and complex equipment, and offline EEG signal analysisby a trained individual.

SUMMARY

This specification describes technologies for EEG signal processing ingeneral, and specifically to sensors for EEG systems that can provideconsistent, good electrical contact between the EEG sensor and theuser's skin. For example, in certain embodiments, EEG sensor devicesgrip locks of the user's hair to anchor itself against the user's scalp.The devices can feature a mechanical or electromechanical mechanism thatallows hair to be threaded through a channel in one direction only.

In general, in a first aspect, the invention features a sensor devicethat includes a sensor housing defining a channel extending along achannel axis through the housing from a first side of the sensor housingto a second side of the sensor housing opposite the first side, at leastone contact electrode extending from the first side of the housing, anelectrically-conducting lead attached to the housing in electricalcommunication with the at least one contact electrode, and a lockingmechanism located in the channel permitting one-way axial motion of athread threaded through the channel from the first side to the secondside.

Embodiments of the sensor device can include one or more of thefollowing features. For example, the locking mechanism can include aratchet. In some embodiments, the ratchet is a linear ratchet. Thelinear ratchet can include a rack of teeth and one or more pawls thatengage the rack of teeth to permit relative motion between the rack ofteeth and the thread in one direction and limit relative motion betweenthe rack of teeth and the thread in an opposite direction. Each of theteeth can have a first surface with a first slope with respect to theaxial direction and a second surface with a second slope with respect tothe axial direction, the first slope being greater than the secondslope.

In some embodiments, the ratcheting device is a rotary ratchet. Therotary ratchet can include at least one gear configured to rotate inabout a rotary axis orthogonal to the channel axis and at least one pawlarranged to engage the gear to permit the gear to rotate in onedirection of rotation and limit rotation in an opposite direction ofrotation.

The device can include a mechanical release switch arranged to disengagecomponents of the ratchet to permit axial motion of the thread throughthe channel from the second side to the first side.

The locking mechanism comprises an electromechanical actuator arrangedto engage the thread and translate the device relative to the thread.The electromechanical actuator can include a piezoelectric actuator. Theelectromechanical actuator can be a linear actuator or a rotaryactuator. The device can include a sensor for monitoring contact betweenthe at least one contact electrode and a user's scalp and an electronicprocessor in communication with the sensor and the electromechanicalactuator, the electronic processor being programmed to adjust a positionof the sensor device along the thread based on the monitored contact.The electronic processor can be programmed to adjust the position tomaintain a level of electrical contact between the at least one contactelectrode and the user's scalp.

The at least one contact electrode can include a plurality ofspatially-separated electrical contact points. The plurality ofspatially-separated electrical contact points are electrically connectedin parallel to the electrically-conducting lead.

The device can include a release mechanism for releasing the lockingmechanism to permit disengagement of the sensor device from the thread.

In a further aspect, the invention features a system that includes abioamplifier and the sensor device in communication with thebioamplifier via the electrically-conducting lead.

Among other advantages, the systems include portable, robustbioamplifiers that can provide real-time analysis of EEG signals underconditions that would typically result in significant signal noise andtherefore be unusable or more difficult to use with other systems. Forexample, the systems can incorporate machine learning models that cleanamplified EEG signals in real time to reduce signal noise. The machinelearning models can be implemented on the same chip or hardware thatperforms EEG signal acquisition. The bioamplifiers can also analyze theEEG signals in real-time.

In some embodiments, the systems can provide real-time EEG analysisfacilitating user interaction with a digital environment. For example,EEG systems can incorporate machine learning models that interpret EEGsignals associated with information presented to the user by a computerdevice (e.g., a mobile device or personal computer). Accordingly, a usercan use the disclosed systems to interact with a computer device usingonly their brain activity.

The details of one or more embodiments of the subject matter of thisspecification are set forth in the accompanying drawings and thedescription below. Other features, aspects, and advantages of thesubject matter will become apparent from the description, the drawings,and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of an embodiment of an EEG system.

FIG. 2 is a flowchart showing aspects of the operation of the EEG systemshown in FIG. 1

FIG. 3 is a plot comparing two EEG signals for analysis using the systemin FIG. 1.

FIG. 4 is a flowchart showing other aspects of the operation of the EEGsystem shown in FIG. 1.

FIG. 5 is a schematic diagram of an embodiment of an EEG system thatfeatures a head-mounted camera.

FIG. 6 is a schematic diagram of another embodiment of an EEG systemthat features a mobile phone and a wireless connection to the system'ssensor electrodes.

FIG. 7A is a perspective view of an embodiment of a sensor electrodeincluding multiple wire loops.

FIG. 7B is a side view of the sensor electrode shown in FIG. 7A.

FIG. 7C is a top view of the sensor electrode shown in FIG. 7A.

FIG. 7D is a bottom view of the sensor electrode shown in FIG. 7A.

FIG. 8 is a perspective view of another embodiment of a sensor electrodeincluding multiple wire loops.

FIG. 9 is a perspective view of an embodiment of a sensor electrode thatincludes wires of differing lengths.

FIG. 10A is a perspective view of an embodiment of a sensor electrodethat includes multiple protuberances.

FIG. 10B is a side view of the sensor electrode shown in FIG. 10A.

FIG. 10C is a top view of the sensor electrode shown in FIG. 10A.

FIG. 10D is a bottom view of the sensor electrode shown in FIG. 10A.

FIG. 11A is a perspective view of an embodiment of a sensor electrodethat includes a protective collar.

FIG. 11B is an exploded perspective view of the sensor electrode shownin FIG. 11A.

FIG. 11C is a side view of the sensor electrode shown in FIG. 11A.

FIG. 11D is a bottom view of the sensor electrode shown in FIG. 11A.

FIG. 11E is a top view of the sensor electrode shown in FIG. 11A.

FIG. 12 is a schematic diagram illustrating use of an EEG system usinghair ratcheting sensors.

FIG. 13A is a perspective view of an embodiment of a hair ratchetingsensor.

FIG. 13B is a plan view of the hair ratcheting sensor shown in FIG. 13A.

FIG. 13C is a cross-sectional view of the hair ratcheting sensor shownin FIG. 13A.

FIG. 14 is a cross-sectional view of another embodiment of a hairratcheting sensor.

FIG. 15 is a cross-sectional view of a ratchet device for a hairratcheting sensor.

FIG. 16 is a schematic diagram of an embodiment of a hair ratchetingsensor that includes an electromechanical actuator.

FIG. 17 is a schematic diagram of another embodiment of a hairratcheting sensor that includes an electromechanical actuator.

FIG. 18 is a schematic diagram of a data processing apparatus that canbe incorporated into an EEG system.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

Referring to FIG. 1, an EEG system 100 features a portable bioamplifier110 that collects and analyzes EEG signals from a user 101 usingelectrode sensors 136, 137, and 138 attached to user 101's scalp.Bioamplifier 110 is in communication with a personal computer 140 whichdisplays information 142—in this instance an image of an ice creamcone—to user 101. Bioamplifier 110 synchronously collects EEG signalsfrom user 101 while displaying information 142 and analyzes the EEGsignals, interpreting in real time user 101's brain activity responsiveto viewing the information.

In certain embodiments, bioamplifier 110 is a high-impedance, low-gainamplifier with a high dynamic range. The bioamplifier impedance may be,for example, higher than 10 megaohms (e.g., 12 M∧ or more, 15 M∧ ormore, 20 M∧ or more) with a maximum gain of 24× amplification. Thedynamic range of bioamplifier 110 should be sufficient to acquire theentire voltage range of typical EEG signals (e.g., 0.1 to 200 μV overfrequency ranges of 1 to 100 Hz). As a portable unit, bioamplifier 110is housed within a compact, robust casing, providing a package that canbe readily carried by user 101, sufficiently robust to remain functionalin non-laboratory settings.

Electrode sensors 136, 137, and 138 may be dry sensors or may be placedin contact with the user's scalp using a gel. The sensors can be securedin place using, for example, adhesive tape, a headband, or some otherheadwear. One of sensors 136, 137, and 138 is an active sensor.Generally, the active sensor's location on the user's scalp depends onthe location of brain activity of interest. In some implementations, theactive sensor is placed at the back of the user's head, at or close tothe user's inion. Another one of the sensors is a reference sensor. TheEEG signal typically corresponds to measured electrical potentialdifferences between the active sensor and the reference sensor. Thethird sensor is a ground sensor. Typically, the ground sensor is usedfor common mode rejection and can reduce (e.g., prevent) noise due tocertain external sources, such as power line noise. In someimplementations, the ground and/or reference sensors are located behindthe user's ears, on the user's mastoid process.

Bioamplifier 110 includes jacks 132 and 134 for connecting leads 135 and143 to the electrode sensors and personal computer 140, respectively.Bioamplifier 110 further includes an analogue-to-digital converter 112,an amplifier 114, and a processing module 120. Although depicted as asingle analogue-to-digital converter and a single amplifier,analogue-to-digital converter 112 and amplifier 114 may each havemultiple channels, capable of converting and amplifying each EEG signalseparately. A power source 130 (e.g., a battery, a solar panel, areceiver for wireless power transmission) is also contained inbioamplifier 110 and is electrically connected to ADC 112, amplifier114, and processing module 120. In general, analogue-to-digitalconverter 112 and amplifier 114 are selected to yield digital signals ofsufficient amplitude to be processed using processing module 120.

Processing module 120 includes one or more computer processorsprogrammed to analyze and clean amplified EEG signals received fromamplifier 114 in real time. The computer processors can includecommercially-available processors (e.g., a raspberry pimicro-controller) and/or custom components. In some embodiments,processing module 120 includes one or more processors custom designedfor neural network computations (e.g., Tensor Processing Unit fromGoogle or Intel Nervanna NNP from Intel Corp.). Generally, processingmodule 120 should include sufficient computing power to enable real timecleaning and analysis of the EEG signals.

The components of processing module 120 are selected and programmed toinclude two machine learning (ML) models: a ML cleaning model 122 and aML two-choice decision model 124. ML cleaning model 122 receives raw EEGsignals from amplifier 114 and, by application of a machine learningalgorithm, cleans the signals to reduce noise. Thus, ML cleaning model122 outputs cleaned EEG signals that have a reduced signal-to-noiseratio as compared with the input signals. Cleaning the EEG signalincludes various operations that improve the usability of the signal forsubsequent analysis, e.g., by reducing noise in the EEG signal. Forexample, cleaning the EEG signal can include filtering the signal byapplying a transfer function to input data, e.g., to attenuate somefrequencies in the data and leave others behind. Other signal cleaningoperations are also possible. For example, signals can be cleaned usinga neural network. Cleaning can also include operations to improve signalquality besides removal of undesirable frequencies. For instance,cleaning can include removing blinks, which digital filtering alone doesnot do.

Referring to FIG. 2, the process of digitizing, amplifying, and cleaningan EEG signal is shown in a flowchart 200. An EEG signal, e.g., atime-varying voltage differential between a voltage measured using anactive sensor and a reference sensor, is received by a bioamplifier(e.g., bioamplifier 110) from the sensors attached to the user's scalp(step 210). The frequency at which the sensor voltage is sampled shouldbe sufficient to capture voltage variations indicative of the brainactivity of interest (e.g., between 0.1 and 10 Hz, at 10 Hz or more, at50 Hz or more, at 100 Hz or more). An ADC (e.g., ADC 112) converts thesignal from an analogue signal to a digital signal (step 220) and sendsthe digital signal to an amplifier (e.g., amplifier 114). The digitalEEG signal is then amplified (e.g., by amplifier 114) (step 230), andthe amplified signal sent to a processor (e.g., processing module 120).The processor (e.g., processing module 120), in real time, cleans theamplified signal using a machine learning model (e.g., ML model 122),thereby generating a filtered (e.g., cleaned) signal (step 240), andoutputs the cleaned signal having increased signal-to-noise compared toan uncleaned EEG signal (step 250).

In general, any of a variety of ML models suitable for signal processingcan be used to clean the amplified EEG signal. In many cases, the MLmodel is a neural network, which is an ML model that employs one or morelayers of nonlinear units to predict an output for a received input.Some neural networks are deep neural networks that include two or morehidden layers in addition to the input and output layers. The output ofeach hidden layer is used as input to another layer in the network,i.e., another hidden layer, the output layer, or both. Some layers ofthe neural network generate an output from a received input, while somelayers do not (remain “hidden”). The network may be recurrent orfeedforward. It may have a single output or an ensemble of outputs; itmay be an ensemble of architectures with a single output or a singlearchitecture with a single output.

A neural network for a machine learning model (e.g., ML model 122) canbe trained on EEG-specific data in order to distinguish between actual,usable data and noise. The ML model can be trained to classify artifactsin the EEG and to deal with EEG segments that have different types ofnoise in different ways. For example, if the network recognizes avertical eye movement (a blink) it could attempt to remove the blinkusing a different approach than it would use if it recognized ahorizontal eye movement. The ML model can be trained to clean data to anarbitrary level of precision—that is, it can clean up the raw data alittle bit or a lot but there is no theoretical limit as to how closelythe ML model can reproduce the type of clean data it was trained on. Thelevel of cleaning that the ML model does is dependent only on time andthe architecture of the model, that is, there is no theoretical maximumamount of possible cleaning.

EEG signals, even under controlled conditions, may contain significantnoise, e.g., due to biological and/or electrical sources. The propensityfor noise is further increased outside of a well-controlled laboratoryenvironment. Accordingly, ML-based noise reduction may be particularlybeneficial in providing usable EEG data in real time in real world(i.e., outside of a well-controlled environment) conditions.

As noted previously, a processor (e.g., processing module 120) includesa machine learning two-choice decision model (e.g., ML two-choicedecision model 124) for analyzing cleaned EEG signals that output from amachine learning cleaning model (e.g., ML cleaning model 122). Thetwo-choice model interprets a response of a user (e.g., user 101) toinformation (e.g., information 142) presented via a computer (e.g.,computer 140). A user's response may be a selection of one choice amonga finite set, e.g., two or more, of choices presented to the user. Thetwo-choice model associates one of two binaries with information (e.g.,information 142), such as interest (e.g., acceptance of an option) ofthe user in the information, or disinterest (e.g., rejection of anoption).

In general, various parameters of the cleaned EEG signal can be used todetermine the user's response (e.g., the user's choice selection).Often, these parameters include the amplitude of the response amplitudeover a relevant time period (e.g., within about 500 ms of beingpresented with information 142). This is illustrated in the plot shownin FIG. 3, for example, which compares two EEG signals corresponding tointerest (trace 310) and disinterest (trace 320) in informationpresented to the user. After an initial latency of approximately 50 ms,trace 310 has a significantly larger amplitude than trace 320. A machinelearning model (e.g., ML model 124) associates the higher amplitude withthe user's interest, and returns this information to a computer (e.g.,computer 140).

This process is illustrated by flowchart 400 shown in FIG. 4. In step410, a system (e.g., system 100) presents information (e.g., information142) to a user (e.g., user 101) via a user interface, for example,provided by a personal computer (e.g., personal computer 140). Thesystem (e.g., system 100) receives EEG signals from the system's sensorsplaced on (e.g., removably attached or otherwise coupled to) the user'sscalp (step 420). The system (e.g., system 100) amplifies and cleans thesignals as described above using an amplifier and a machine learningmodel (e.g., ML model 122). The system (e.g., system 100) then providesthe cleaned EEG signals as input to a machine learning model (e.g., MLmodel 124), which generates an output from the input indicating theuser's response to information (e.g., information 142) or selection ofan option (step 430). The system provides input and generates output inreal-time to feed a closed loop. In embodiments, signal analysisinvolves correlating the cleaned EEG signal to the presentation ofinformation to the user (e.g., by matching a time-stamp associated withsignal to the time of presentation) and observing the time-varyingamplitude of the signal associated with the user's brain activityresponsive to the information. The system can decompose the signal intoa time series of signal amplitude and/or change in signal amplitude andperform mathematical operations on the time series to determine theuser's intent. For example, the mathematical operations can associate achange in signal amplitude above a certain threshold and within acertain time (e.g., with 50 ms or less) of presenting the user with theinformation with a particular intention (e.g., an affirmative response)and a change in signal amplitude below the threshold with the oppositeintention (e.g., a negative response). The threshold amplitude and/orresponse time can be determined by training the ML model.

The system (e.g., system 100) then outputs results indicative of theuser's response to the information (step 440). The user's response tothe information may be a selection among multiple choices. For example,the user may be presented with a menu of options to order for dinner.The user may respond with EEG signals that the system can process todetermine the user's dinner choice. The system can then output theselected dinner choice of the user.

In some embodiments, a bioamplifier (e.g., bioamplifier 110) can relaythe results of two-choice decision model analysis to another device(e.g., personal computer 140), which may take certain actions dependingon the results. Examples are described below.

In some embodiments, the cleaning and analysis processing occurs on thesame processing module (e.g., using the same processor, e.g., the sameprocessor core), the system does not need to send the signals across anetwork and therefore does not incur added data processing latency ofnetwork connections or bandwidth restrictions. The system executescalculations as soon as the amplified signal is ready for processing,providing a very low lag response to the user.

Moreover, the system can operate as a closed-loop system. For example,the bioamplifier and other device (e.g., personal computer 140) operateusing feedback in which the system regulates presentation of informationto the user by the device based on the analysis of the user's prior orcontemporaneous EEG signals. For instance, the device can present theuser with a choice between two or more different options and, based onthe user's selection as interpreted from the associated EEG signals,present subsequent choices to the user associated with the user's priorchoice.

In some embodiments, the system (e.g., system 100) can use the receivedEEG signals from the user's brain activity to determine a user'sselection among the finite set of possibilities and subsequently performan action based on the user's selection without requiring the user toprovide more input than the brain activity signals. In order todetermine the correct action to execute, a machine learning model (e.g.,ML model 124) takes EEG signals as input and classifies the EEG signalsaccording to the user's intended action. This is achieved by processingthe cleaned EEG input to the machine learning model (e.g., ML model 124)through the hidden layers of the model and performing machineclassification. This may involve, for example, feature extraction orsuccessive nonlinear recordings.

Essentially, the cleaned data is presented to the machine learning model(e.g., ML model 124) and then the machine learning model (e.g., ML model124) performs a number of mathematical transformations of the cleaneddata in order to produce an output that reflects the intention of theuser as encoded in the EEG data. The ML model is able to do this becauseit has been extensively trained, prior to interaction with the user, onwhat types of EEG signals correspond to what types of responses (e.g.,selections by the user).

In general, a variety of neural networks can be used to analyze andclassify the data. For example, the neural network can be aconvolutional neural network model, a support vector machine, or agenerative adversarial model. In some implementations, lower dimensionalmodels, e.g., a low featural multilayer perceptron or divergentautoencoder can be implemented. The minimum number of features that canbe used to achieve acceptable accuracy in decoding the user's intentionis preferred for computational simplicity. The optimized models may betrained or simulated in constrained computing environments in order tooptimize for speed, power, or interpretability. Three primary featuresof optimization are 1) the number of features extracted (as describedabove), 2) the “depth” (number of hidden layers) of the model, and 3)whether the model implements recurrence. These features are balanced inorder to achieve the highest possible accuracy while still allowing thesystem to operate in near real time on the embedded hardware.

In some embodiments, the machine learning model (e.g., ML model 124)uses sub-selection in which the model only compares the current user'sbrain activity with other user samples that are most similar to that ofthe user in order to determine the user's selection. Similarity to otherusers can be operationalized with standard techniques such as waveformconvolution and normalized cross correlation. Alternatively, the machinelearning model (e.g., ML model 124) compares the user's brain activityto that of all brain activity present in a large dataset. The datasetmay contain brain activity samples from one or more other users. Samplesfor comparison are drawn either from 1) a data system's internal userdata or 2) data collected from external users who have opted-in tohaving their data be included in the comparison database. All samplesare anonymized and are non-identifiable.

To train the machine learning model (e.g., ML model 124), a system(e.g., system 100) can present a user with a choice problem, e.g., atwo-choice problem, using a display on a personal computer (e.g.,computer 140) or some other interaction element. In someimplementations, the system (e.g., system 100) provides the user withone object at a time, e.g., for 500 milliseconds, with random jitter,e.g., between 16 and 64 milliseconds, added between objects. Each imageshown to the user is either an image of a first type of object or animage of a second type of object. Prior to displaying any images, theuser is told to pay particular attention to the first type of object,e.g., by counting or some other means. While the system (e.g., system100) is presenting images to the user, it differentiates EEG signalsbetween when the user is paying particular attention to images of thefirst type of object and when the user is not paying as close ofattention to images of the second type of object.

For example, the system (e.g., system 100) presents the user withsequence of images showing one of two different objects (e.g., a rabbitor a squirrel). Prior to displaying images, the user is told to payparticular attention to images of squirrels only, and to count thesquirrels. As each image displays, the system (e.g., system 100) recordsthe user's brain activity and determines a difference between when theuser views an image of a rabbit and when the user views an image of asquirrel. This difference is attainable because 1) the squirrels aretask-relevant (to the task of counting squirrels) and the rabbits arenot and 2) the squirrel-counting task requires an update of workingmemory (i.e., the number of squirrels that have been viewed) each time asquirrel appears. These cognitive processes are reflected in relativelylarge signals measurable by the EEG system and separable by the MLmodel.

In some embodiments, the machine learning model (e.g., ML model 124) canbe trained using equal numbers of objects so that the model does notlearn the true population frequency distribution of the objects in theuser's world, which may impair the model's ability to distinguishbetween the user's choices. For example, the system may be trained withequal numbers of squirrels and rabbits, though most users encountersquirrels more often than rabbits.

After collecting samples from the user, the system (e.g., system 100)classifies the user's EEG signals to distinguish between EEG signalselicited when the user is focused on an image (e.g., views the squirrelin the example above) and when the user is not (e.g., the rabbit). Thisis accomplished by the machine learning model (e.g., ML model 124).Prior to being passed to the ML system, the signals may bepre-processed, such as by boxcar filtering, range-normalization, orlength normalization. The pre-processed signals are then passed to themachine learning model (e.g., ML system 124) for classification. Theclassification may be implemented in either a single-model fashion(i.e., classification is done by a single model) or in an ensemble-modelfashion (i.e., a number of different types of models all make aclassification and then the overall choice is made by a vote). In someimplementations, the user samples can be added to the dataset in adatabase accessible to the system (e.g., system 100) and used to trainsubsequent neural network models.

Once the model is trained broadly across multiple functional objects,tasks, and people, the system can use the ML model on any person for anydecision task without further training. The more similar the newdecision task is to the trained task, the more effective this transferwill be.

ML models can be trained on various characteristics of the user. Forexample, in some implementations, models may be trained on a specificage group, e.g., over 40 or under 20. The model may take into account auser's age and choose user samples in the same age range or choose froma subset of user samples in the database. As described above, thedatabase will consist of both internal data and data from external userswho have opted-in to their data being included in the comparisondatabase. All samples are anonymized and non-identifiable. Individualswill have the option to include not only their EEG data, but otherdemographic data such as age and gender. System 100 can then use thetrained model in real-life scenarios to distinguish between a selectionevent by the user and rejection.

In general, an EEG system (e.g., EEG system 100) can present a user(e.g., user 101) with choices among a finite set, e.g., two or more, ofpossibilities, determine the choice that the user (e.g., user 101) hasmade based on EEG signals from brain activity, and then perform furtheractions based on the user's choice. As a result, the user (e.g., user101) can cause the system (e.g., system 100) to perform certain actionswithout any physical action beyond having the user view the choices on adisplay and generate brain activity from a selection of the viewedchoices.

For example, the user (e.g., user 101) can choose a contact from a listof multiple contacts and place a phone call the chosen contact usingonly the user's brain activity. To perform this activity, the EEG system(e.g., EEG system 100) sequentially presents the user (e.g., user 101)with a list of contacts via a computer (e.g., computer 140) andidentifies a selection from the list based on received EEG signals fromthe user's corresponding brain activity. Next, the system (e.g., system100) presents the user (e.g., user 101) with options for contacting theselected contact, e.g., call, text, share, or email. Again, the systemidentifies the user's selection based on received EEG signalscorresponding to the user's brain activity representing a selection ofan option. The system (e.g., system 100) then performs the call orprovides instructions to a telephone to make the call.

While bioamplifier 110 is interfaced with personal computer 140 insystem 100, other configurations are also possible. Referring to FIG. 5,for example, an EEG system 500 includes bioamplifier 110 interfaced witha head-mounted camera system 510 which is arranged to track user 101'sfield of view. Camera system 510 includes a camera 512 and onboard imageprocessing for analyzing images captured by the camera of user 101'sfield of view. For example, EEG system 500 is configured to facilitateuser 101's interaction with an object 522 associated with a quickresponse (QR) code 520 (as illustrated) or bar codes, NFC tags, or someother identification feature readily identifiable using machine vision.

An EEG system (e.g., system 500) analyzes EEG signals from a user (e.g.,user 101) associated with brain waves responsive to a viewing object(e.g., viewing object 522) synchronously with reading a QR code (e.g.,QR code 520). The analysis returns one of two binary choices, which thesystem associates with the viewing object (e.g., object 522) based onthe system viewing the QR code (e.g., QR code 520).

While the systems described above both feature a portable bioamplifier(i.e., bioamplifier 110), that connects with either a computer or otherinterface, other implementations are also possible. For example, thecomponents of a bioamplifier (e.g., bioamplifier 110) can be integratedinto another device, such as a mobile phone or tablet computer.Moreover, while the foregoing systems includes sensors that areconnected to the portable bioamplifier using leads, other connections,e.g., wireless connections, are also possible. Referring to FIG. 6, forinstance, an EEG system 600 includes a mobile phone 610 and ahead-mounted sensor system 620. The cleaning and analysis functions ofthe components of portable bioamplifier 110, personal computer 140,and/or camera system 510 described above are all performed by mobilephone 610 alone, or in conjunction with cloud-based computer processors.Mobile phone 610 includes a wireless transceiver 612, a display 622, anda camera 614.

Sensor system 610 includes a transceiver unit 620 and sensors 636, 637,and 638 connected to the transceiver unit. The sensors measure EEGsignals as described above, but the signals are related to receiver 612using a wireless signal transmission protocol, e.g., BlueTooth,near-field communication (NFC), or some other short-distance protocol.

During operation, a mobile phone (e.g., mobile phone 610) displaysinformation (e.g., information 624) to a user (e.g., user 101) on adisplay (e.g., display 622) and, synchronously, receives and analyzesEEG signals from a transceiver unit (e.g., transceiver unit 620). Basedon the EEG signal analysis, the mobile phone (e.g., mobile phone 610)can take certain actions related to the displayed information. Forinstance, the phone can accept or reject phone calls based on the EEGsignals, or take some other action.

Alternatively, or additionally, a user (e.g., user 101) can use a camera(e.g., camera 614) to capture information in their environment (e.g., toscan a QR code) while the phone receives and analyzes their associatedbrain waves.

In general, the EEG systems described above can use a variety ofdifferent sensors to obtain the EEG signals. In some implementations,the sensor electrodes are “dry” sensor which feature one or moreelectrodes that directly contact the user's scalp without a conductivegel. Dry sensors can be desirable because they are simpler to attach andtheir removal does not involve the need to clean up excess gel. A sensorgenerally includes one or more electrodes for contacting the user'sscalp.

Referring to FIGS. 7A-7D, for example, a sensor 700 includes multiplewire loop electrodes 720 mounted on a base 710, and a press studelectrode 730 on the opposite side of base 710 from loops electrodes710. Wire loop electrodes 720 are bare electrically-conducting wiresthat are in electrical contact with metal press stud 730. During use, auser can position sensor 700 in their hair with the top of wire loopelectrodes contacting their scalp. A lead, featuring female press studfastener, is connected to press stud 730, connecting sensor 700 to abioamplifier or transceiver. The multiple loop electrodes provideredundant contact points with the user's scalp, increasing thelikelihood that the sensor maintains good electrical contact with theuser's scalp.

As is apparent in FIG. 7C (top view), sensor electrode 700 includes atotal of eight wire loop electrodes arranged symmetrically about anaxis. More generally, the number of wire loop electrodes can vary asdesired. The length of the wire loop electrodes (from base to tip) canalso vary as desired. For instance, a user with long hair may select asensor with longer wire loops than a user with shorter hair. FIG. 8, forexample, shows another sensor electrode 800 similar to sensor electrode700 but with shorter wire loop electrodes 820. In general, the loopelectrodes can have a length from about 1 mm to about 15 mm.

FIG. 9 shows yet a further sensor electrode 900 that includes multiplewire electrodes 920. Wire electrodes 920 can be sufficiently flexible sothat the user can bend them to provide optimal contact with the scalp.Each wire electrode 920 can have the same length, or the lengths of thewires can vary.

Other dry sensor designs are also possible. For example, referring toFIGS. 10A-10D, a sensor electrode 1000 features multiple protuberances1040 supported by a base 1010. The protuberances are formed from arelatively soft material, such as a rubber. As seen from a top view, asshown in FIG. 10C, protuberances 1040 are arranged in two concentricrings. The protuberances in the inner ring each include a wire electrode1020 which protrudes from the tip of the respective protuberance. Theprotruding wire electrodes can be relatively short, reducing possibleuser discomfort due to the excessive pressure on the user's scalp.

Referring to FIGS. 11A-11E, a further example of a sensor electrode 1100includes a base 1110, wire electrodes 1120, a press stud electrode 1130,and a protective cap 1140 (e.g., a plastic cap). The cap can reduce thelikelihood that the user's hair becomes ensnared in the electrode, e.g.,where the electrodes are attached to the base.

In certain embodiments, consistent, good electrical contact between anEEG sensor and the user's scalp can be achieved by using a sensor devicethat grips locks of the user's hair and then ratchets, rolls, or motorsup, using a power actuator, the hair to anchor the sensor against theuser's scalp. The sensor device features a mechanical mechanism thatgrips the user's hair and easily allows movement in one direction, butdoes not allow easy movement in the other direction so that the sensordevice consistently moves forward towards the user's scalp.

Referring to FIG. 12, an EEG system 1200 features sensor devices 1220that each grip a lock of hair 102, 103 of user 101, which the user thenmoves along the hair lock to the user's scalp. Devices 1220 each includea device (e.g., a ratcheting device) that permits easy movement alongthe hair lock towards the scalp, but prevents easy movement in theopposite direction so that the devices maintain good contact with theuser's scalp once applied. The sensor devices are attached to leads 1230that connect to bioamplifier 110, facilitating signal transmissionbetween devices 1220 and bioamplifier 110.

Generally, hair ratcheting sensor devices use a mechanical approach,e.g., threading, snapping, or clipping, to grip locks of the user'shair. The hair ratcheting sensor devices 1220 each contain a channelthrough which locks of user's hair 102, 103 is threaded in onedirection. Any number of mechanical insertion approaches can be viablein order for the sensor device to grip locks of the user's hair 102,103. For example, the sensor device may include an adjustable clamp,e.g., similar to adjustable clamps commonly used to clamp objects to aline of thread.

Generally, sensors 1220 include a mechanism for moving the sensorpreferentially in one direction, towards the user's scalp. In someembodiments, this mechanism is a ratchet, which is a mechanical devicethat allows continuous linear or rotary motion in only one directionwhile preventing motion in the opposite direction. Generally, linear orrotary ratchets can be used. For example, referring to FIGS. 13A-13C, asensor 1320 is composed of a sensor housing 1325 (e.g., a metal and/orplastic element that contains other components of the sensor) and aseries of electrode pins 1340. A channel 1326, through which the userthreads a lock of their hair, runs through housing 1325. A lead 1330connects sensor 1320 to the bioamplifier. Each of electrode pin 1340 isin parallel electrical communication with lead 1330, as illustrated bythe dotted connections in FIG. 13B.

A ratchet is arranged within channel 1326 and arranged to allow easymovement of sensor 1320 along a lock of hair in the +z direction, butinhibits movement in the −z direction. The ratchet is composed of twointerlocking layers, locking layer 1350 and layer 1355. Locking layer1350 includes a base 1351 and a series of pawls 1353 each attached tolayer 1351 by a corresponding springing hinge 1352. The springing hingesallow rotation of the corresponding pawl towards base 1351 uponapplication of a force, but restore the pawl to its resting positionwhen the force terminates.

Layer 1355 includes a base 1356 that supports a linear rack of teeth1353 which interlock with pawls 1353 when the pawls are in their restingpositions. Teeth 1353 are uniform but asymmetrical, with each toothhaving a moderate slope on one edge and a much steeper slope on theother edge.

When a lock of hair threaded is through channel 1326 and the sensor ismoved in the unrestricted (i.e., +z) direction, the pawls rotate upwardstowards base 1351, opening the channel and allowing easy movement of thesensor along the hair. When the sensor is moved in the oppositedirection, the pawls relax to engage teeth 1353 with the lock of hairbetween them, making motion of the sensor along the hair lock in the −zdirection difficult or impossible.

Sensor 1320 also includes a hinge 1322 which runs along the length ofhousing 1325, and a magnetic lock 1328 (see FIG. 13B). To release sensor1320 from the lock of hair, the user releases magnetic lock 1328 (e.g.,by prying the two parts of the lock apart) and opens the sensor abouthinge 1322. This opens up channel 1326, releasing interlocking layers1350 and 1355, allowing the user to remove the sensor from their hairwith ease. FIG. 13B illustrates the sensor with the channel opened.

While sensor 1320 features a fastener (i.e., magnetic fastener 1328) andhinge mechanism (i.e., hinge 1322) to allow the user to release thesensor, other implementations are possible. For example, referring toFIG. 14, a sensor device 1400 includes a release latch 1410 fordisengaging pawls 1353 from teeth 1357, opening channel 1326 andallowing the user to thread device 1300 along their lock of hair awayfrom their scalp.

Furthermore, while sensor 1320 features six pin electrodes 1340, otherarrangements are possible. For instance, sensor 1400 includes a singlecontinuous electrode 1440 (e.g., a metalized surface of the sensorhousing). Lead 1330 requires only a single point of connection 1430 toelectrode 1440.

While sensors 1300 and 1400 both feature linear ratchets, rotaryratchets are also possible. For example, referring to FIG. 15, in someembodiments, sensor devices include a ratchet composed of a gear 1510and a pawl 1520, but attached to a frame via corresponding axles 1511and 1521, respectively. Gear 1510 includes teeth that each feature agently sloping surface 1512 and a steep surface 1514. Anticlockwisemotion of gear 1510 cause pawl to ride along surface 1512 of theadjacent tooth, rotating clockwise as it approaches the tooth's apex. Asthe pawl crests the apex, a spring mechanism built into axle 1521 causesthe pawl to snap down to the gently sloping surface 1521 of the nextgear tooth. Conversely, clockwise rotation of gear 1510 causes the pawlto engage the steep surface 1514 of the adjacent tooth, locking the gearand preventing rotation.

Accordingly, for a lock of hair threaded through a channel 1526 runningtangential to gear 1510, motion of the hair against gear 1510 in the +zdirection forces anticlockwise gear rotation which the ratchet freelypermits. Movement of the hair in the opposite direction, however,requires clockwise rotation of the gear, which the pawl prevents.

In some embodiments, the sensor device release mechanism is purelymechanical (e.g., as for sensors 1300 and 1400). For example, a user maysqueeze the side of the sensor body to open the sensor device hinge inorder to release hair and therefore the sensor. In other embodiments,the sensor device can be released using signals from the bioamplifierregarding when to open and close the channel of the angle ratchetingstructure. Signals may open the channel to allow hair to move upwardtowards the scalp at defined intervals or until the sensor device sensesthe user's scalp. The sensor device release mechanism may then stayclosed until a signal from the bioamplifier either causes the hinge toopen or the teeth to release.

Furthermore, while the foregoing examples of hair ratcheting sensors usemechanical ratchets, other implementations are also possible. Forexample, in some embodiments, sensors can use electromechanicalactuators which automatically move the sensor back and forth along alock of the user's hair.

Referring to FIG. 16, for example, a sensor 1600 includes an inch-wormpiezoelectric actuator to move sensor 1600 along a lock of hair 1601.The inch-work actuator is mounted within a channel 1610 running throughthe body of the sensor and is composed of two components which pinchhair lock 1601 between them. Each component features threepiezo-actuators 1620 a, b, 1621 a, b, and 1622 a, b. Piezo-actuators1620 a, 1620 b, 1621 a, and 1622 b expand/contract in the y-direction,while piezo-actuators 1622 a and 1622 b expand and contract in thez-direction. The piezo-actuators are attached to the sensor body viamounting attachments 1624 a and 1624 b, respectively.

A controller 1650 electrifies the piezo-actuators in sequence to movesensor 1600 along hair lock 1601 in the +z or −z direction as follows.Motion of the sensor is due to the lateral extension of piezo-actuators1622 a, b pushing on two clutching piezo-actuators 1620 a, b or 1621 a,b.

The actuation process of the inch-worm actuator is a six step cyclicalprocess after the initial relaxation and initialization phase.Initially, all three piezo actuators of each component are relaxed andunextended. To initialize the inch-worm actuator the clutchingpiezo-actuators furthest from the direction of desired motion, e.g.,piezo-actuators 1620 a, b for motion in the +z direction are electrifiedfirst, extending these actuators to grip lock 1601 between them, thenthe six step cycle begins as follows: First, the lateral piezo-actuators1622 a, b are both extended, advancing sensor 1600 in the +z direction.Then, piezo-actuators 1621 a, b are electrified to cause these actuatorsto grip lock 1601, while clutching actuators 1620 a, b both release thelock. Lateral piezo-actuators 1622 a, b then relax, further advancingsensor 1600 in the +z direction. Clutching piezo-actuators 1621 a, b therelease lock 1601 while 1620 a, b grip, and the process is repeated.

Electrification of the piezo-actuators can accomplished by applying ahigh bias voltage to the actuators via controller 1650. To move longdistances the sequence of steps is repeated many times in rapidsuccession. Once the motor has moved sufficiently close to the desiredfinal position, the motor may be switched to an optional finepositioning mode. In this mode, the clutches receive constant voltage(one high and the other low), and the lateral piezo voltage is thenadjusted to an intermediate value, under continuous feedback control, toobtain the desired final position.

In some implementations, positioning of sensor 1600 is controlled via afeedback control circuit to maintain a desired level of contact with theuser's scalp. For example, controller 1650 includes a sensor 1656 (e.g.,a contact pressure sensor or an electrical impedance sensor) whichmeasures a parameter indicative of the degree of contact of electrode1640 with the user's scalp. Via a processor 1654, controller 1650monitors signals from sensor 1656 and delivers drive signals to theinch-worm actuator via a signal generator 1652. Typically, controller1650 is provided with a threshold value or a range of values for theparameter measured by sensor 1656 and the controller operates usingfeedback from the sensor to adjust the sensors position using theinch-worm actuator.

While the components of controller 1650 are depicted in FIG. 16 as beingcontained within the body of sensor 1600, more generally, one or more ofthe components can be external to the sensor body, e.g., part of thebioamplifier.

Other electromechanical actuators can be used. For example, referring toFIG. 17, rotary actuators can be used. Specifically, a sensor device1700 includes a pair of electric motors that turn two interlocking gears1710 a and 1710 b. Lock 1601 is threaded between gears 1710 a and 1710b, and rotation of the gears causes sensor device 1700 to advance alonglock 1601 in either the +z or −z directions.

In general, the EEG systems described above can be used to accomplish avariety of computer-based tasks. For example, the disclosed system andtechniques can be used to perform tasks commonly performed using anetworked computer device (e.g., a mobile phone), such as ordering food,scheduling a flight, interacting with household or personal electronicdevices, and/or purchasing a ticket for an event. The system can be usedfor user interaction with objects that have QR codes, bar codes, NFCtags, or another type of identification feature on them so that a systemcan detect the object with which the user is interacting and determinetasks associated with the object. These can be objects in a user's homesuch as a thermostat, television, phone, oven, or other electronicdevice. By way of example, an automated pet door in the user's house mayhave an associated QR code. By receiving the QR code from the dog door,the system may determine that the user is interacting with the door withtheir mobile phone. The system then can present the user with a list ofoptions associated with the pet door on their phone. The system can thencollect and analyze the user's EEG signals to determine what action theuser would like the system to perform, in this example, whether or notto lock the pet door. Similarly, a system (e.g., EEG system 100) may usea user's phone or other computing device to notice proximity of a smartdevice. Proximity can be recognized by wireless or wired connectivity,(e.g., Bluetooth, near field communication, RFID, or GPS). Onceproximity is determined, the system can present the user with a choicerelated the smart device. For example, a user's phone may be able tonotice that it is in proximity to a smart thermostat, such as a Nest, aHoneywell Lyric Round, or a Netatmo's thermostat, and then present theuser with a choice about whether the user would like the temperature tobe warmer or colder. Using the EEG decision making protocol describedabove, the system could then adjust the temperature in the room on thebasis of the user's EEG, without the user having to physically interactwith the thermostat. Any other two choice decision that can be made fora smart device (e.g., a smart home device such as an Amazon Alexa,Google Home, or Wemo plug device) could be implemented in the sameway—for example turning a smart light on or off, turning the volume of asmart speaker up or down, or making a decision to buy or not to buy whatis in a digital shopping cart.

Embodiments of the subject matter and the functional operationsdescribed in this specification can be implemented in digital electroniccircuitry, in tangibly-embodied computer software or firmware, incomputer hardware, including the structures disclosed in thisspecification and their structural equivalents, or in combinations ofone or more of them. Embodiments of the subject matter described in thisspecification can be implemented as one or more computer programs, i.e.,one or more modules of computer program instructions encoded on atangible non-transitory storage medium for execution by, or to controlthe operation of, data processing apparatus. The computer storage mediumcan be a machine-readable storage device, a machine-readable storagesubstrate, a random or serial access memory device, or a combination ofone or more of them. Alternatively, or in addition, the programinstructions can be encoded on an artificially-generated propagatedsignal, e.g., a machine-generated electrical, optical, orelectromagnetic signal, which is generated to encode information fortransmission to suitable receiver apparatus for execution by a dataprocessing apparatus.

The term “data processing apparatus” refers to data processing hardwareand encompasses all kinds of apparatus, devices, and machines forprocessing data, including by way of example a programmable processor, acomputer, or multiple processors or computers. The apparatus can alsobe, or further include, special purpose logic circuitry, e.g., an FPGA(field programmable gate array) or an ASIC (application-specificintegrated circuit). The apparatus can optionally include, in additionto hardware, code that creates an execution environment for computerprograms, e.g., code that constitutes processor firmware, a protocolstack, a database management system, an operating system, or acombination of one or more of them.

A computer program, which may also be referred to or described as aprogram, software, a software application, an app, a module, a softwaremodule, a script, or code, can be written in any form of programminglanguage, including compiled or interpreted languages, or declarative orprocedural languages; and it can be deployed in any form, including as astand-alone program or as a module, component, subroutine, or other unitsuitable for use in a computing environment. A program may, but neednot, correspond to a file in a file system. A program can be stored in aportion of a file that holds other programs or data, e.g., one or morescripts stored in a markup language document, in a single file dedicatedto the program in question, or in multiple coordinated files, e.g.,files that store one or more modules, sub-programs, or portions of code.A computer program can be deployed to be executed on one computer or onmultiple computers that are located at one site or distributed acrossmultiple sites and interconnected by a data communication network.

The processes and logic flows described in this specification can beperformed by one or more programmable computers executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby special purpose logic circuitry, e.g., an FPGA or an ASIC, or by acombination of special purpose logic circuitry and one or moreprogrammed computers.

Computers suitable for the execution of a computer program can be basedon general or special purpose microprocessors or both, or any other kindof central processing unit. Generally, a central processing unit willreceive instructions and data from a read-only memory or a random accessmemory or both. The essential elements of a computer are a centralprocessing unit for performing or executing instructions and one or morememory devices for storing instructions and data. The central processingunit and the memory can be supplemented by, or incorporated in, specialpurpose logic circuitry. Generally, a computer will also include, or beoperatively coupled to receive data from or transfer data to, or both,one or more mass storage devices for storing data, e.g., magnetic,magneto-optical disks, or optical disks. However, a computer need nothave such devices. Moreover, a computer can be embedded in anotherdevice, e.g., a mobile telephone, a personal digital assistant (PDA), amobile audio or video player, a game console, a Global PositioningSystem (GPS) receiver, or a portable storage device, e.g., a universalserial bus (USB) flash drive, to name just a few.

Computer-readable media suitable for storing computer programinstructions and data include all forms of non-volatile memory, mediaand memory devices, including by way of example semiconductor memorydevices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks,e.g., internal hard disks or removable disks; magneto-optical disks; andCD-ROM and DVD-ROM disks.

To provide for interaction with a user, embodiments of the subjectmatter described in this specification can be implemented on a computerhaving a display device, e.g., a CRT (cathode ray tube) or LCD (liquidcrystal display) monitor, for displaying information to the user and akeyboard and a pointing device, e.g., a mouse or a trackball, by whichthe user can provide input to the computer. Other kinds of devices canbe used to provide for interaction with a user as well; for example,feedback provided to the user can be any form of sensory feedback, e.g.,visual feedback, auditory feedback, or tactile feedback; and input fromthe user can be received in any form, including acoustic, speech, ortactile input. In addition, a computer can interact with a user bysending documents to and receiving documents from a device that is usedby the user; for example, by sending web pages to a web browser on auser's device in response to requests received from the web browser.Also, a computer can interact with a user by sending text messages orother forms of message to a personal device, e.g., a smartphone, runninga messaging application, and receiving responsive messages from the userin return.

Embodiments of the subject matter described in this specification can beimplemented in a computing system that includes a back-end component,e.g., as a data server, or that includes a middleware component, e.g.,an application server, or that includes a front-end component, e.g., aclient computer having a graphical user interface, a web browser, or anapp through which a user can interact with an implementation of thesubject matter described in this specification, or any combination ofone or more such back-end, middleware, or front-end components. Thecomponents of the system can be interconnected by any form or medium ofdigital data communication, e.g., a communication network. Examples ofcommunication networks include a local area network (LAN) and a widearea network (WAN), e.g., the Internet.

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other. In someembodiments, a server transmits data, e.g., an HTML page, to a userdevice, e.g., for purposes of displaying data to and receiving userinput from a user interacting with the device, which acts as a client.Data generated at the user device, e.g., a result of the userinteraction, can be received at the server from the device.

An example of one such type of computer is shown in FIG. 18, which showsa schematic diagram of a generic computer system 1800. The system 1800can be used for the operations described in association with any of thecomputer-implemented methods described previously, according to oneimplementation. The system 1800 includes a processor 1810, a memory1820, a storage device 1830, and an input/output device 1840. Each ofthe components 1810, 1820, 1830, and 1840 are interconnected using asystem bus 1850. The processor 1810 is capable of processinginstructions for execution within the system 1800. In oneimplementation, the processor 1810 is a single-threaded processor. Inanother implementation, the processor 1810 is a multi-threadedprocessor. The processor 1810 is capable of processing instructionsstored in the memory 1820 or on the storage device 1830 to displaygraphical information for a user interface on the input/output device1840.

The memory 1820 stores information within the system 1800. In oneimplementation, the memory 1820 is a computer-readable medium. In oneimplementation, the memory 1820 is a volatile memory unit. In anotherimplementation, the memory 1820 is a non-volatile memory unit.

The storage device 1830 is capable of providing mass storage for thesystem 1800. In one implementation, the storage device 1830 is acomputer-readable medium. In various different implementations, thestorage device 1830 may be a floppy disk device, a hard disk device, anoptical disk device, or a tape device.

The input/output device 1840 provides input/output operations for thesystem 1800. In one implementation, the input/output device 1840includes a keyboard and/or pointing device. In another implementation,the input/output device 1840 includes a display unit for displayinggraphical user interfaces.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinvention or on the scope of what may be claimed, but rather asdescriptions of features that may be specific to particular embodimentsof particular inventions. Certain features that are described in thisspecification in the context of separate embodiments can also beimplemented in combination in a single embodiment. Conversely, variousfeatures that are described in the context of a single embodiment canalso be implemented in multiple embodiments separately or in anysuitable subcombination. Moreover, although features may be describedabove as acting in certain combinations and even initially be claimed assuch, one or more features from a claimed combination can in some casesbe excised from the combination, and the claimed combination may bedirected to a subcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various system modulesand components in the embodiments described above should not beunderstood as requiring such separation in all embodiments, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

As used herein, the term “real-time” refers to transmitting orprocessing data without intentional delay given the processinglimitations of a system, the time required to accurately obtain data andimages, and the rate of change of the data and images. In some examples,“real-time” is used to describe concurrently receiving, cleaning, andinterpreting EEG signals. Although there may be some actual delays, suchdelays generally do not prohibit the signals from being cleaned andanalyzed within sufficient time such that the data analysis remainsrelevant to provide decision-making feedback and accomplishcomputer-based tasks. For example, adjustments to a smart thermostat arecalculated based on user EEG signals. Cleaned signals are analyzed todetermine the user's desired temperature before enough time has passedto render the EEG signals irrelevant.

Particular embodiments of the subject matter have been described. Otherembodiments are within the scope of the following claims. For example,the actions recited in the claims can be performed in a different orderand still achieve desirable results. As one example, the processesdepicted in the accompanying figures do not necessarily require theparticular order shown, or sequential order, to achieve desirableresults. In some cases, multitasking and parallel processing may beadvantageous. Wireless or wired connections may be advantageous fordifferent use cases. Miniaturized components may replace existingcomponents. Other data transmission protocols than those listed may bedeveloped and implemented. The nature of the ML systems used for bothdata cleaning and classification may change.

What is claimed is:
 1. A sensor device, comprising: a sensor housing defining a channel extending along a channel axis through the housing from a first side of the sensor housing to a second side of the sensor housing opposite the first side; at least one contact electrode extending from the first side of the housing; an electrically-conducting lead attached to the housing in electrical communication with the at least one contact electrode; and a locking mechanism located in the channel permitting one-way axial motion of a thread threaded through the channel from the first side to the second side.
 2. The sensor device of claim 1, wherein the locking mechanism comprises a ratchet.
 3. The sensor device of claim 2, wherein the ratchet is a linear ratchet.
 4. The sensor device of claim 3, wherein the linear ratchet comprises a rack of teeth and one or more pawls that engage the rack of teeth to permit relative motion between the rack of teeth and the thread in one direction and limit relative motion between the rack of teeth and the thread in an opposite direction.
 5. The sensor device of claim 4, wherein each of the teeth have a first surface with a first slope with respect to the axial direction and a second surface with a second slope with respect to the axial direction, the first slope being greater than the second slope.
 6. The sensor device of claim 2, wherein the ratcheting device is a rotary ratchet.
 7. The sensor device of claim 6, wherein the rotary ratchet comprises at least one gear configured to rotate in about a rotary axis orthogonal to the channel axis and at least one pawl arranged to engage the gear to permit the gear to rotate in one direction of rotation and limit rotation in an opposite direction of rotation.
 8. The sensor device of claim 2, wherein the device comprises a mechanical release switch arranged to disengage components of the ratchet to permit axial motion of the thread through the channel from the second side to the first side.
 9. The sensor device of claim 1, wherein the locking mechanism comprises an electromechanical actuator arranged to engage the thread and translate the device relative to the thread.
 10. The sensor device of claim 9, wherein the electromechanical actuator comprises a piezoelectric actuator.
 11. The sensor device of claim 9, wherein the electromechanical actuator is a linear actuator.
 12. The sensor device of claim 9, wherein the electromechanical actuator is a rotary actuator.
 13. The sensor device of claim 9, further comprising a sensor for monitoring contact between the at least one contact electrode and a user's scalp and an electronic processor in communication with the sensor and the electromechanical actuator, the electronic processor being programmed to adjust a position of the sensor device along the thread based on the monitored contact.
 14. The sensor device of claim 14, wherein the electronic processor is programmed to adjust the position to maintain a level of electrical contact between the at least one contact electrode and the user's scalp.
 15. The sensor device of claim 1, wherein the at least one contact electrode comprises a plurality of spatially-separated electrical contact points.
 16. The sensor device of claim 15, wherein the plurality of spatially-separated electrical contact points are electrically connected in parallel to the electrically-conducting lead.
 17. The sensor device of claim 1, further comprising a release mechanism for releasing the locking mechanism to permit disengagement of the sensor device from the thread.
 18. A system, comprising: a bioamplifier; and the sensor device of claim 1 in communication with the bioamplifier via the electrically-conducting lead. 